package com.timothy.remote.client;

import java.util.HashMap;
import java.util.Map;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = "shiro.client")
public class ClientShiroProperties {

	/** redis中的session过期时间，默认为30分钟 */
	private int redisSessionExpire = 1800;
	/** redis中session key前缀 */
	private String redisSessionPrefix = "shiro:session:";
	/** redis中的cache过期时间，默认为30分钟 */
	private int redisCacheExpire = 1800;
	/** redis中的cache key前缀 */
	private String redisCachePrefix = "shiro:cache:";
	/** redis中授权cache key名字 */
	private String redisAuthCacheName = "authorizationCache";

	/** 远程获取授权的URL */
	private String remoteServiceUrl;
	/** 登录地址 */
	private String loginUrl;
	/** 登录成功后的默认地址 */
	private String loginSuccessUrl;
	/** 未授权重定向地址 */
	private String unauthorizedUrl;
	/** 过滤器字符串 */
	private String filtersStr;
	/** 过滤器链 */
	private Map<String, String> filterChainDefinitions = new HashMap<>();

	public int getRedisSessionExpire() {
		return redisSessionExpire;
	}

	public void setRedisSessionExpire(int redisSessionExpire) {
		this.redisSessionExpire = redisSessionExpire;
	}

	public String getRedisSessionPrefix() {
		return redisSessionPrefix;
	}

	public void setRedisSessionPrefix(String redisSessionPrefix) {
		this.redisSessionPrefix = redisSessionPrefix;
	}

	public int getRedisCacheExpire() {
		return redisCacheExpire;
	}

	public void setRedisCacheExpire(int redisCacheExpire) {
		this.redisCacheExpire = redisCacheExpire;
	}

	public String getRedisCachePrefix() {
		return redisCachePrefix;
	}

	public void setRedisCachePrefix(String redisCachePrefix) {
		this.redisCachePrefix = redisCachePrefix;
	}

	public String getRedisAuthCacheName() {
		return redisAuthCacheName;
	}

	public void setRedisAuthCacheName(String redisAuthCacheName) {
		this.redisAuthCacheName = redisAuthCacheName;
	}

	public String getRemoteServiceUrl() {
		return remoteServiceUrl;
	}

	public void setRemoteServiceUrl(String remoteServiceUrl) {
		this.remoteServiceUrl = remoteServiceUrl;
	}

	public String getLoginUrl() {
		return loginUrl;
	}

	public void setLoginUrl(String loginUrl) {
		this.loginUrl = loginUrl;
	}

	public String getLoginSuccessUrl() {
		return loginSuccessUrl;
	}

	public void setLoginSuccessUrl(String loginSuccessUrl) {
		this.loginSuccessUrl = loginSuccessUrl;
	}

	public String getUnauthorizedUrl() {
		return unauthorizedUrl;
	}

	public void setUnauthorizedUrl(String unauthorizedUrl) {
		this.unauthorizedUrl = unauthorizedUrl;
	}

	public String getFiltersStr() {
		return filtersStr;
	}

	public void setFiltersStr(String filtersStr) {
		this.filtersStr = filtersStr;
	}

	public Map<String, String> getFilterChainDefinitions() {
		return filterChainDefinitions;
	}

	public void setFilterChainDefinitions(Map<String, String> filterChainDefinitions) {
		this.filterChainDefinitions = filterChainDefinitions;
	}
}
